The Python Workshop by Bird Dr Lau Cher Han Mario Corchero Jiménez Graham Lee and Corey Wade

The Python Workshop by Bird Dr Lau Cher Han Mario Corchero Jiménez Graham Lee and Corey Wade

Author:Bird, Dr Lau Cher Han, Mario Corchero Jiménez, Graham Lee, and Corey Wade
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2019-11-04T00:00:00+00:00


Configuring the Logging Stack

Another part of the logging library is the functions to configure it, but before diving into how to configure the logging stack, you should understand its different parts and the role they play.

You've already seen logger objects, which are used to define the logging messages that need to be generated. There are also the following classes, which take care of the process of processing and emitting a log:

Log Records: This is the object that is generated by the logger and contains all the information about the log, including the line where it was logged, the level, the template, and arguments, among others.

Formatters: These take log records and transform them into strings that can be used by handlers that output to streams.

Handlers: These are the ones that actually emit the records. They frequently use a formatter to transform records into strings. The standard library comes with multiple handlers to emit log records into stdout, stderr, files, sockets, and so on.

Filters: Tools to fine-tune log record mechanisms. They can be added to both handlers and loggers.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.